/**
 * Copyright (c) 2022,TravelSky. 
 * All Rights Reserved.
 * TravelSky CONFIDENTIAL
 * 
 * Project Name:ddserver
 * Package Name:com.asb.controller
 * File Name:IndexController.java
 * Date:2022年3月17日 下午12:04:11
 * 
 */
package com.asb.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.asb.models.AppGroup;
import com.asb.models.Movetasktable;
import com.asb.models.Movetasktableper;
import com.asb.service.NotifyService;
import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import com.jfinal.ext.cors.EnableCORS;
import com.jfinal.plugin.activerecord.Db;

import cn.hutool.core.bean.BeanUtil;

/**
 * ClassName: IndexController <br/>
 * Description: TODO <br/>
 * Date: 2022年3月17日 下午12:04:11 <br/>
 * <br/>
 * 
 * @author 1(邮箱)
 * 
 *         修改记录
 * @version 产品版本信息 yyyy-mm-dd 姓名(邮箱) 修改信息<br/>
 * 
 */

@Path("/")
@EnableCORS
public class IndexController extends Controller {

	@Inject
	NotifyService service;

	public void index() {
		String id = getPara("id");
		String cid = getPara("cid");
		Movetasktable dao = new Movetasktable().dao();

		Movetasktable mt = dao.findById(id);

		mt.setCopytoname(cid);

		Movetasktableper dao1 = new Movetasktableper().dao();

		Movetasktableper mt1 = dao1.findById(cid);

		getPara("id");

		mt1.set("depart", "fff");

		dao1.find("a like %b%");

		String a = getRawData();
		JSONObject b = (JSONObject) JSON.parse(a);

		BeanUtil.copyProperties(mt, b, "id");
		JSONObject c = (JSONObject) b.get("executor");
		BeanUtil.copyProperties(mt1, c, "id");

		renderJson(mt);

	}

}
